<!-- tech_detail -->
<!-- 用户中心=》设备与技术提供商=》技术详情 -->
<!-- 用户中心=》用能单位=》项目详情 -->
@include("user.head")
<div class="wrapper">
	<div class="col-xs-12 no_padding_both">
		<ol class="breadcrumb">
	      <li><a href="<%url('')%>">碳银网首页</a></li>
	      <li><a href="<%url('industry')%>">低碳产业</a></li>
	      <li><a href="<%url('industry/tech')%>">低碳技术</a></li>
	      <li class="active"><%$model["tech_name"]%></li>
	    </ol>
	</div>
	<div class="row">
		<div class="col-xs-12">
			<div class="col-xs-6 no_padding">
				<img src="<%url('images')%>/<%$model["uid"]%>/tech/<%$model["image"]%>" height="440" width="480" alt="">
			<!--<div class="col-xs-12 no_padding bianju">
				<div class="col-xs-3 no_padding"><img src="<%url('user/img/project.png')%>"height="80" width="100" alt=""></div>
				<div class="col-xs-3 no_padding"><img src="<%url('user/img/project.png')%>"height="80" width="100" alt=""></div>
				<div class="col-xs-3 no_padding"><img src="<%url('user/img/project.png')%>"height="80" width="100" alt=""></div>
			</div>-->
			</div>
			<div class="col-xs-6">
				<div class="col-xs-12 proritht"><%$model["tech_name"]%></div>
				<div class="col-xs-12 prorightRice bianju">
					<span class="prorightRice_size">
						<%$model["userData"]["company_name"]%>
					</span>
					<a href="javascript:;" class="fr" ralate='<%$model["id"]%>' id="collect">
						<i @if($isCollect)class="fa fa-star" @else class="fa fa-star-o" @endif  id="collectIcon"></i>收藏
					</a>
				</div>
				<div class="col-xs-12 bianju proContent">
					<div class="col-xs-12">
						<div class="col-xs-3 text-right no_padding_left">技术名称:</div>
						<div class="col-xs-9 no_padding_both"><%$model["tech_name"]%></div>
					</div>
					<div class="col-xs-12">
						<div class="col-xs-3 text-right no_padding_left">技术评价:</div>
						<div class="col-xs-9 no_padding_both">
							<div style="padding-top:13px;font-size:18px;width:<%$model["score"]*17%>px;overflow:hidden;white-space:nowrap;">
								<i class="fa fa-star star_color"></i><i class="fa fa-star star_color"></i><i class="fa fa-star star_color"></i><i class="fa fa-star star_color"></i><i class="fa fa-star star_color"></i>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="col-xs-3 text-right no_padding_left">开发者:</div>
						<div class="col-xs-9 no_padding_both"><%$model["developer"]%></div>
					</div>
					<div class="col-xs-12">
						<div class="col-xs-3 text-right no_padding_left">技术优势:</div>
						<div class="col-xs-9 no_padding_both"><%$model["advantage_des"]%></div>
					</div>
					<div class="col-xs-12">
						<div class="col-xs-3 text-right no_padding_left">应用领域:</div>
						<div class="col-xs-9 no_padding_both">
							@if (isset($model["tech_domain"]["domain"]["parent"]))
							<%$model["tech_domain"]["domain"]["parent"]["cate_name"]%> <%$model["tech_domain"]["domain"]["cate_name"]%>
							@else
							<%$model["tech_domain"]["domain"]["cate_name"]%>
							@endif
						</div>
					</div>
					<div class="col-xs-12">
						<div class="col-xs-3 text-right no_padding_left">典型客户:</div>
						<div class="col-xs-9 no_padding_both"><%$model["typical_client"]%></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row no_margin proDetail">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#jieshao" data-toggle="tab" aria-expanded="true">技术介绍</a></li>
			<li class=""><a href="#jingdu" data-toggle="tab" aria-expanded="false">应用项目</a></li>
			<li class=""><a href="#liebiao" data-toggle="tab" aria-expanded="false">技术案列</a></li>
		</ul>
		<div id="myTabContent" class="tab-content">
			<div class="tab-pane fade active in" id="jieshao">
			  	<div class="row no_margin techDetail">
			  		<div class="col-xs-12 no_padding">
			  			<div class="panel panel-default">
				 			<div class="row panel-heading text-center no_margin">
				 				<div class="col-xs-4 text-left">技术原理概况</div>
							</div>
							<div class="panel-body">
								<div class="row">
									<div class="col-xs-12" id="content">
									</div>
								</div>
							</div>
			 			</div>
			  		</div>
			  	</div>
			</div>

			<div class="tab-pane fade bianju upMar downMar" id="jingdu">
		        @if (isset($model["tech_project"]))
				<div class="bs-example" data-example-id="panel-without-body-with-table">
				    <div class="panel panel-default">
				      <table class="table">
				        <tbody>
					        <tr class="techGood">
					            <th class="col-xs-3 text-center">项目名称</th>
					            <th class="col-xs-5 text-center">项目状态</th>
					            <th class="col-xs-2 text-center">项目计划启动时间</th>
					            <th class="col-xs-2 text-center">项目计划完成时间</th>
					        </tr>
					        @foreach ($model["tech_project"] as $project)
							<tr>
					            <td>
					            	<a href="<%url('industry/project/detail?pid=')%><%$project['projects']['id']%>">
										<%$project["projects"]["name"]%>
					            	</a>
					            </td>
					            <td class="text-center">
					            	@if ($project["projects"]["is_financing"])
										@if ($project["projects"]["state"] == 0)
											<span class="label label-danger">正在招标中</span>
										@elseif($project["projects"]["state"] == 1)
											<span class="label label-warning">已确认执行方</span>
										@elseif($project["projects"]["state"] == 2)
											<span class="label label-success">正在进行中</span>
										@elseif($project["projects"]["state"] == 3)
											<span class="label label-primary">项目已完成</span>
										@endif
									@else
									项目未资产化
									@endif
					            </td>
					            <td class="text-center">
					            	<%noSecond($project["projects"]["start_time"])%>
					            </td>
					            <td class="text-center">
					            	<%noSecond($project["projects"]["end_time"])%>
					            </td>
					        </tr>
					        @endforeach
				        </tbody>
				      </table>
				    </div>
				</div>
		        @else
					无技术案例
		        @endif
		 	</div>

		  	<div class="tab-pane fade bianju  upMar downMar" id="liebiao">
		        @if(isset($model["tech_cases"]) && count($model["tech_cases"]))
		        <div class="bs-example" data-example-id="panel-without-body-with-table">
				    <div class="panel panel-default">
				      <table class="table">
				        <tbody>
					        <tr class="techGood">
					            <th class="col-xs-3 text-center">案列名称</th>
					            <th class="col-xs-3 text-center">案列内容</th>
					            <th class="col-xs-3 text-center">开始时间</th>
					            <th class="col-xs-3 text-center">结束时间</th>
					        </tr>
					        @foreach ($model["tech_cases"] as $case)
							<tr>
					            <td>
				            		<a href="<%url('industry/project/detail?pid=')%><%$project['projects']['id']%>">
										<%$case["name"]%>
					            	</a>
					            </td>
					            <td><%$case["content"]%></td>
					            <td class="text-center"><%noSecond($case["start_time"])%></td>
					            <td class="text-center"><%noSecond($case["end_time"])%></td>
					        </tr>
					        @endforeach
				        </tbody>
				      </table>
				    </div>
				</div>
				@else
				暂无案例
				@endif
		 	</div>
		</div>
	</div>
</div>
@include("user.footer")
@include("user.common")
<script type="text/javascript">
$("#content").html(decodeURIComponent('<%$model["theory"]%>'));
// 添加收藏
$("#collect").bind('click', function(){
	_this = $(this);
	var relate_id = $(this).attr("ralate");
	$.post("<%url('collect/add_collect')%>", {
		type : 2,
		relate_id : relate_id
	}, function (data){
		if(data == 1){
			$("#collectIcon").attr("class", 'fa fa-star');
		}else if(data == 0){
			$("#collectIcon").attr("class", 'fa fa-star-o');
		}
		else{
			window.location.href = "<%url('login')%>";
		}
	})
});
</script>